package com.sourcestruct.linearlist;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author: ZhouBert
 * @date: 2019/6/8
 * @description:	泛型单链表结构
 */
@Getter
@Setter
@ToString
public class LinkedList<T> {

	private T data;

	private LinkedList next;

	/**
	 *
	 * @param data
	 */
	public LinkedList(T data) {
		this.data = data;
	}

	/**
	 *
	 * @param data
	 * @param next
	 */
	public LinkedList(T data, LinkedList next) {
		this.data = data;
		this.next = next;
	}
}
